/*
Copyright © 2023 taiping
*/

package cmd

import (
	"fmt"
	"github.com/spf13/cobra"
	"wit-gen/config"
)

var versionCmd = &cobra.Command{
	Use:     "version",
	Aliases: []string{"v"},
	Short:   "打印gen的版本号。",
	Long:    `所有软件都有版本，这是gen的。`,
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("gen", config.Version)
	},
}

func init() {
	rootCmd.AddCommand(versionCmd)
}
